package aco_serial;

import java.util.ArrayList;

public class Tour {
	private ArrayList<Edge> edges;
	
	public Tour(){
		edges = new ArrayList<Edge>();
	}
	
	public boolean contains(Edge e){
		for(Edge edge : edges){
			if(edge.getFrom() == e.getFrom() && edge.getTo() == e.getTo()){
				return true;
			}
		}
		return false;
	}
	
	public void add(Edge e){
		edges.add(e);
	}
	
	public String toString(){
		String result = "";
		for(Edge e : edges){
			result += e.getFrom() + " - " + e.getTo() + "\n";
		}
		return result;
	}
}
